package com.huizhonglm.diap.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.huizhonglm.diap.R;
import com.huizhonglm.diap.core.utils.TPWDUtil;
import com.huizhonglm.diap.core.utils.ToastUtil;

/**
 * 描述当前类的作用
 *
 * @author LiXiaoLong
 * @version 1.0
 * @since 2016-07-10 15:58
 */
public class TestActi extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        assignViews();
    }

    @Override
    protected void assignViews() {
        Button btn = (Button) findViewById(R.id.login_btn);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //showTPWDInputDialog();
            }
        });
    }

    private TPWDUtil tpwdUtil;

    private void showTPWDInputDialog() {
        if (tpwdUtil == null) {
            tpwdUtil = new TPWDUtil(this, new TPWDUtil.OnInputCompleteListener() {
                @Override
                public void onInputCompleted(String tpwd) {
                    ToastUtil.makeTextLong("交易密码输入完成：" + tpwd);
                }
            });
        }
        tpwdUtil.showDialog();
    }
}
